<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="com.lmpop.frame.util.*" %>
<html>
	<%
	
	RandomID randomID = new RandomID();
		String adv_id = randomID.GenTradeId();
		String user_id="";	

	if( session.getAttribute("session_user_id") != null )
	{
		user_id = session.getAttribute("session_user_id").toString();
	}
	
	%>
	
	
	
  <head>
    <title>分类广告管理 </title>
		<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
		<script language="javascript" type="text/javascript" src="js_listAdv.js"></script>
		<script language="javascript" type="text/javascript" src="/js/jquery.js"></script>
		<script language="javascript" type="text/javascript" src="/program/plugins/calendar/WdatePicker.js"></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ts_categoryInfo.js'></script>   
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ti_channelInfo.js'></script>
</head>

<body>
	<h1>新增分类广告</h1>
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">

		<tr>
			<td align="right" width="10%">
			&nbsp;&nbsp;	&nbsp;&nbsp;广告名称<font color="#ff0000">*</font>	
			</td>
			<td colspan="3">	<input name="adv_title" id="adv_title" style="width:200px" type="text" maxLength="100" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				关键字类型<font color="#ff0000">*</font>
			</td>
			<td colspan="3">
				<select name="key_type"  id="key_type" onChange="showCustomer(this.value)">
			      <option value="">请选择</option>
				    <option value="3">商机分类广告</option>
				    <option value="0">商品分类广告</option>
				    
	 			</select>
			</td>
		</tr>
				<input type="hidden" name="key_type" id="key_type" value=""/>
		<tr>
			<td align="right" width="10%">
				广告范围<font color="#ff0000">*</font>
			</td>
			<td colspan="3">
			 <div id="txtHint"><b>选择关键字类型后您才可以选择广告范围.</b></div>
				</td>
		</tr>
			<input type="hidden" name="class_id1" id="class_id1" value="">
			<input type="hidden" name="class_id2" id="class_id2" value="">
			<input type="hidden" name="class_id3" id="class_id3" value="">	 
			<input type="hidden" name="adv_rang" id="adv_rang" value=""/>
									
			<input type="hidden" id="name1" style="color:#FF7300;"></input>
			<input type="hidden" id="name2" style="color:#FF7300;"></input>
			<input type="hidden" id="name3" style="color:#FF7300;"></input> 
	
			<td align="right" width="10%">
				价格<font color="#ff0000">*</font>	
			</td>
			<td ><input name="price" size="8" id="price" maxLength="5" type="text" onBlur="Num();"/>&nbsp;元/天</td>

			<td align="right" width="10%">
				链接图片:
			</td>
			<td colspan="3">
				<jsp:include page="/program/inc/uploadImgInc.jsp">
					<jsp:param name="attach_root_id" value="<%=adv_id%>" />
				</jsp:include>
			</td>
		</tr>
			<tr>
					<td align="right" width="15%">
						开始时间<font color="#ff0000">*</font>
					</td>
					<td width="20%">
						<input name="start_date" id="s_start_date" type="text" onClick="WdatePicker({maxDate:'#F{$dp.$D(\'s_end_date\',{d:-1})}',readOnly:true})" style="width:200px" class="Wdate" maxlength="10" />
					</td>

					<td align="right" width="12%">
							结束时间<font color="#ff0000">*</font>
					<td>
						<input name="end_date" id="s_end_date" type="text"  onclick="WdatePicker({minDate:'#F{$dp.$D(\'s_start_date\',{d:1})}',readOnly:true})" style="width:200px" class="Wdate"  value="" maxlength="10" />
					</td>
			</tr>
		
				<tr id="advText">
					<td align="right" valign="center" class="list_left_box">
						广告文本<font color="#ff0000">*</font>					
					</td>
				  	<td valign="top" colspan="3">
							<textarea name="adv_text" id="adv_text" cols="50" rows="6" onKeyUp="if(this.value.length > 500) this.value=this.value.substr(0,500)" ></textarea>
				    </td>
				</tr>
		<tr>
			<td align="right" width="10%">
				广告显示顺序:
			</td>
			<td><input name="adv_post" id="adv_post" size="8" maxLength="5" type="text" onBlur="Num();"/></td>
				<td align="right" valign="top" class="list_left_box">
					广告链接:
					</td>
					<td valign="top" colspan="3" >
						<input name="adv_url" id="adv_url" type="text" style="color:#999999;width:200px;" value="http://" maxlength="300" size="40" class="input" />
				</td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				联系人:
			</td>
			<td ><input name="contact" id="contact" style="width:200px;" type="text" maxLength="15" />
			<td align="right" width="12%">
				联系方式:
			</td>
			<td colspan="3"><input name="contact_info" id="contact_info" style="width:200px;" type="text" maxLength="300" /></td>
		</tr>
		
		
	</table>
	
	<input name="adv_id" id="adv_id" type="hidden" value="<%=adv_id%>"/>
	<input name="remark" id="remark" type="hidden" value="" />
	<input name="in_date" id="in_date" type="hidden" value="" />
	<input name="user_id" id="user_id" type="hidden" value="<%=user_id%>"/>

	<input type="hidden" name="key_words" id="key_words" value="9" />
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="6774" />
				<input class="buttoncss" type="button" name="tradeSub" value="提交" onClick="return subForm();"/>&nbsp;&nbsp;
				<input class="buttoncss" type="button" name="tradeRut" value="返回" onClick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
